﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleSurvival.src
{
    //-----------------------------------------------//
    //CLASS - IntroState.cs
    //-----------------------------------------------//
    //The first screen
    //Has a button to go to the gameplay
    public class IntroState : State
    {
        Textbox _newGame;   //Button

        public IntroState(Game g)
            : base(g)
        {
            _newGame = new Textbox(32, 32, 80, 20, "New Game");
            _newGame.IsHidden = false;
            base.IsTransparent = false;
        }

        public override void Update(double dt)
        {
            if (_newGame.IsPressed())       //If button pressed to go gameplay
            {
                Console.WriteLine("New game pressed");
                Game.AddNewTopState(new GameState(Game));   //And new gamestate on top of state machine
            }
            base.Update(dt);
        }

        public override void Draw(double dt)
        {
            _newGame.Draw();    //Draw button
            base.Draw(dt);
        }
    }
}
